<script setup>
import { getRandomColor } from '../../utils/index.js'

const props = defineProps({
  delay: {
    type: Number,
    required: true,
    default: 1000
  }
})

const color = await getRandomColor(props.delay)
</script>

<template>
  <div class="rect-box"></div>
</template>

<style scoped>
.rect-box {
  width: 200px;
  height: 100px;
  margin: 15px;
  border-radius: 10px;
  /* 将来，这里的背景颜色值，需要动态获取并填充到这里 */
  background-color: v-bind(color);
  box-shadow: 3px 3px 10px #666;
  cursor: pointer;
}
</style>
